﻿using System;
using Yunzuan.Foundation.Attributes;
using Yunzuan.Foundation.Entities;

namespace Retail.Models.DBModels
{
    [Table(TableName = "yz_order", PrimaryKey = "OrderID")]
    public class Order : BaseEntity
    {
        public Order()
        { }
        #region Model
        private int _orderid;
        /// <summary>
        ///主键ID
        /// </summary>
        public int OrderID
        {
            get { return _orderid; }
            set { this.ChangeNotify<int>("OrderID", value, ref _orderid); }
        }
        private string _orderno;
        /// <summary>
        ///订单号(规则待定)
        /// </summary>
        public string OrderNo
        {
            get { return _orderno; }
            set { this.ChangeNotify<string>("OrderNo", value, ref _orderno); }
        }
        private int _goodstypeid;
        /// <summary>
        ///商品类别(1裸钻,2统包,3成品,4彩宝,5翡翠,6素金)
        /// </summary>
        public int GoodsTypeID
        {
            get { return _goodstypeid; }
            set { this.ChangeNotify<int>("GoodsTypeID", value, ref _goodstypeid); }
        }
        private int? _inventoryid;
        /// <summary>
        ///商品ID
        /// </summary>
        public int? InventoryID
        {
            get { return _inventoryid; }
            set { this.ChangeNotify<int?>("InventoryID", value, ref _inventoryid); }
        }
        private decimal? _inventorycount = 1.000M;
        /// <summary>
        ///
        /// </summary>
        public decimal? InventoryCount
        {
            get { return _inventorycount; }
            set { this.ChangeNotify<decimal?>("InventoryCount", value, ref _inventorycount); }
        }
        private string _supplier;
        /// <summary>
        ///供应商，不用手动指定
        /// </summary>
        public string Supplier
        {
            get { return _supplier; }
            set { this.ChangeNotify<string>("Supplier", value, ref _supplier); }
        }
        private string _arrivaltime;
        /// <summary>
        ///
        /// </summary>
        public string ArrivalTime
        {
            get { return _arrivaltime; }
            set { this.ChangeNotify<string>("ArrivalTime", value, ref _arrivaltime); }
        }
        private string _inventoryattribute;
        /// <summary>
        ///商品属性(包含颜色重量切工等信息..)
        /// </summary>
        public string InventoryAttribute
        {
            get { return _inventoryattribute; }
            set { this.ChangeNotify<string>("InventoryAttribute", value, ref _inventoryattribute); }
        }
        private decimal _rapnet;
        /// <summary>
        ///国际报价
        /// </summary>
        public decimal Rapnet
        {
            get { return _rapnet; }
            set { this.ChangeNotify<decimal>("Rapnet", value, ref _rapnet); }
        }
        private decimal? _purchaseusd;
        /// <summary>
        ///买入的美金价格
        /// </summary>
        public decimal? PurchaseUSD
        {
            get { return _purchaseusd; }
            set { this.ChangeNotify<decimal?>("PurchaseUSD", value, ref _purchaseusd); }
        }
        private decimal? _purchaseexchangerate;
        /// <summary>
        ///采购汇率
        /// </summary>
        public decimal? PurchaseExchangerate
        {
            get { return _purchaseexchangerate; }
            set { this.ChangeNotify<decimal?>("PurchaseExchangerate", value, ref _purchaseexchangerate); }
        }
        private decimal? _purchasermb;
        /// <summary>
        ///买入的人民币价格
        /// </summary>
        public decimal? PurchaseRMB
        {
            get { return _purchasermb; }
            set { this.ChangeNotify<decimal?>("PurchaseRMB", value, ref _purchasermb); }
        }
        private decimal? _purchasereturn;
        /// <summary>
        ///买入退点
        /// </summary>
        public decimal? PurchaseReturn
        {
            get { return _purchasereturn; }
            set { this.ChangeNotify<decimal?>("PurchaseReturn", value, ref _purchasereturn); }
        }
        private decimal? _confirmusd;
        /// <summary>
        ///出售的美金价格
        /// </summary>
        public decimal? ConfirmUSD
        {
            get { return _confirmusd; }
            set { this.ChangeNotify<decimal?>("ConfirmUSD", value, ref _confirmusd); }
        }
        private decimal? _salesexchangerate;
        /// <summary>
        ///销售汇率
        /// </summary>
        public decimal? SalesExchangerate
        {
            get { return _salesexchangerate; }
            set { this.ChangeNotify<decimal?>("SalesExchangerate", value, ref _salesexchangerate); }
        }
        private decimal? _confirmrmb;
        /// <summary>
        ///出售的人民币价格
        /// </summary>
        public decimal? ConfirmRMB
        {
            get { return _confirmrmb; }
            set { this.ChangeNotify<decimal?>("ConfirmRMB", value, ref _confirmrmb); }
        }
        private decimal? _salesreturn;
        /// <summary>
        ///卖出退点
        /// </summary>
        public decimal? SalesReturn
        {
            get { return _salesreturn; }
            set { this.ChangeNotify<decimal?>("SalesReturn", value, ref _salesreturn); }
        }
        private int? _customerid;
        /// <summary>
        ///客户ID
        /// </summary>
        public int? CustomerID
        {
            get { return _customerid; }
            set { this.ChangeNotify<int?>("CustomerID", value, ref _customerid); }
        }
        private int _userid;
        /// <summary>
        ///操作员ID
        /// </summary>
        public int UserID
        {
            get { return _userid; }
            set { this.ChangeNotify<int>("UserID", value, ref _userid); }
        }
        private string _remarks;
        /// <summary>
        ///备注
        /// </summary>
        public string Remarks
        {
            get { return _remarks; }
            set { this.ChangeNotify<string>("Remarks", value, ref _remarks); }
        }
        private int _paymentbankid;
        /// <summary>
        ///付款银行账户ID
        /// </summary>
        public int PaymentBankID
        {
            get { return _paymentbankid; }
            set { this.ChangeNotify<int>("PaymentBankID", value, ref _paymentbankid); }
        }
        private int _receiptbankid;
        /// <summary>
        ///收款银行账户ID
        /// </summary>
        public int ReceiptBankID
        {
            get { return _receiptbankid; }
            set { this.ChangeNotify<int>("ReceiptBankID", value, ref _receiptbankid); }
        }
        private int _purchaseuserid;
        /// <summary>
        ///采购ID
        /// </summary>
        public int PurchaseUserID
        {
            get { return _purchaseuserid; }
            set { this.ChangeNotify<int>("PurchaseUserID", value, ref _purchaseuserid); }
        }
        private int _orderstatus;
        /// <summary>
        ///订单状态：0 删除 1 待采购 2 待到货 3 待出货 4 已出货 5 取消成功，已作废 6 退货成功 已自留 7 已退回 8 正常（1,2,3,4） 9 异常（5,6,7）
        /// </summary>
        public int OrderStatus
        {
            get { return _orderstatus; }
            set { this.ChangeNotify<int>("OrderStatus", value, ref _orderstatus); }
        }
        private int _paymentstatus = 0;
        /// <summary>
        ///付款状态：0未支付 1已支付
        /// </summary>
        public int PaymentStatus
        {
            get { return _paymentstatus; }
            set { this.ChangeNotify<int>("PaymentStatus", value, ref _paymentstatus); }
        }
        private DateTime _paymenttime;
        /// <summary>
        ///付款时间
        /// </summary>
        public DateTime PaymentTime
        {
            get { return _paymenttime; }
            set { this.ChangeNotify<DateTime>("PaymentTime", value, ref _paymenttime); }
        }
        private int _receiptstatus = 0;
        /// <summary>
        ///收款状态：0未支付 1已支付
        /// </summary>
        public int ReceiptStatus
        {
            get { return _receiptstatus; }
            set { this.ChangeNotify<int>("ReceiptStatus", value, ref _receiptstatus); }
        }
        private DateTime _rectime;
        /// <summary>
        ///收款时间
        /// </summary>
        public DateTime RecTime
        {
            get { return _rectime; }
            set { this.ChangeNotify<DateTime>("RecTime", value, ref _rectime); }
        }
        private decimal _freight;
        /// <summary>
        ///运费
        /// </summary>
        public decimal Freight
        {
            get { return _freight; }
            set { this.ChangeNotify<decimal>("Freight", value, ref _freight); }
        }
        private string _shipno;
        /// <summary>
        ///出货单号
        /// </summary>
        public string ShipNo
        {
            get { return _shipno; }
            set { this.ChangeNotify<string>("ShipNo", value, ref _shipno); }
        }
        private DateTime _shiptime;
        /// <summary>
        ///出货时间
        /// </summary>
        public DateTime ShipTime
        {
            get { return _shiptime; }
            set { this.ChangeNotify<DateTime>("ShipTime", value, ref _shiptime); }
        }
        private string _shipremarks;
        /// <summary>
        ///出货备注
        /// </summary>
        public string ShipRemarks
        {
            get { return _shipremarks; }
            set { this.ChangeNotify<string>("ShipRemarks", value, ref _shipremarks); }
        }
        private int _online;
        /// <summary>
        ///回库状态,(NULL没有回库，1回库 )
        /// </summary>
        public int Online
        {
            get { return _online; }
            set { this.ChangeNotify<int>("Online", value, ref _online); }
        }
        private decimal _buydis;
        /// <summary>
        ///现货的买入退点
        /// </summary>
        public decimal BuyDis
        {
            get { return _buydis; }
            set { this.ChangeNotify<decimal>("BuyDis", value, ref _buydis); }
        }
        private decimal _buyusdprice;
        /// <summary>
        ///现货的买入$
        /// </summary>
        public decimal BuyUSDPrice
        {
            get { return _buyusdprice; }
            set { this.ChangeNotify<decimal>("BuyUSDPrice", value, ref _buyusdprice); }
        }
        private decimal _buyrmbprice;
        /// <summary>
        ///现货的买入RMB
        /// </summary>
        public decimal BuyRMBPrice
        {
            get { return _buyrmbprice; }
            set { this.ChangeNotify<decimal>("BuyRMBPrice", value, ref _buyrmbprice); }
        }
        private string _buypurchasesupplier;
        /// <summary>
        ///现货的原供应商
        /// </summary>
        public string BuyPurchaseSupplier
        {
            get { return _buypurchasesupplier; }
            set { this.ChangeNotify<string>("BuyPurchaseSupplier", value, ref _buypurchasesupplier); }
        }
        private DateTime _buypurchasetime;
        /// <summary>
        ///买入时间
        /// </summary>
        public DateTime BuyPurchaseTime
        {
            get { return _buypurchasetime; }
            set { this.ChangeNotify<DateTime>("BuyPurchaseTime", value, ref _buypurchasetime); }
        }
        private DateTime _createtime;
        /// <summary>
        ///创建时间
        /// </summary>
        public DateTime CreateTime
        {
            get { return _createtime; }
            set { this.ChangeNotify<DateTime>("CreateTime", value, ref _createtime); }
        }
        private DateTime _modifytime;
        /// <summary>
        ///修改时间
        /// </summary>
        public DateTime modifyTime
        {
            get { return _modifytime; }
            set { this.ChangeNotify<DateTime>("modifyTime", value, ref _modifytime); }
        }
        private int _addressid;
        /// <summary>
        ///
        /// </summary>
        public int AddressID
        {
            get { return _addressid; }
            set { this.ChangeNotify<int>("AddressID", value, ref _addressid); }
        }
        private string _activeip;
        /// <summary>
        ///IP
        /// </summary>
        public string ActiveIP
        {
            get { return _activeip; }
            set { this.ChangeNotify<string>("ActiveIP", value, ref _activeip); }
        }
        private string _activeaddress;
        /// <summary>
        ///地点
        /// </summary>
        public string ActiveAddress
        {
            get { return _activeaddress; }
            set { this.ChangeNotify<string>("ActiveAddress", value, ref _activeaddress); }
        }
        private decimal _buyexchangerate;
        /// <summary>
        ///现货的采购汇率
        /// </summary>
        public decimal BuyExchangerate
        {
            get { return _buyexchangerate; }
            set { this.ChangeNotify<decimal>("BuyExchangerate", value, ref _buyexchangerate); }
        }
        #endregion

    }
}
